package day09;

public abstract class Staff {
    private int salary;

    public void setSalary(int salary) {
        this.salary = salary;
    }

    public abstract double getSalary();
}
class Manager extends Staff{
@Override
    public double getSalary(){
    return 8000;
}
}
class Saler extends  Staff{
    @Override
    public double getSalary(){
       return 6000;
    }
}
class Ordinary extends Staff{
    @Override
    public double getSalary(){
        return 4000;
    }
}
class Main3{
    public static double getSalary(Staff staff){
        return staff.getSalary();
    }
    public static void main(String[] args) {
        System.out.println(getSalary(new Ordinary()));
        System.out.println(getSalary(new Manager()));
        System.out.println(getSalary(new Saler()));
    }
}
